Skip to content

Commit d90f68f

Browse files
committed
Fixed so we don't copy a page of vmap highbytes from config when we should copy 0 bytes.
1 parent e87a4ec commit d90f68f

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

asm/ozmoo.asm

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ z_init
12031203
lda #TERPNO ; Interpreter number (8 = C64)
12041204
ldy #header_interpreter_number
12051205
jsr write_header_byte
1206-
lda #71 ; "G" = release 7
1206+
lda #72 ; "H" = release 8
12071207
ldy #header_interpreter_version ; Interpreter version. Usually ASCII code for a capital letter
12081208
jsr write_header_byte
12091209
lda #25
@@ -1954,23 +1954,29 @@ prepare_static_high_memory
19541954
- sta vmap_next_quick_index,x ; Sets next quick index AND all entries in quick index to 0
19551955
dex
19561956
bpl -
1957-
1957+
1958+
; Copy vmem info from config blocks to vmap
19581959
lda #6
19591960
clc
19601961
adc config_load_address + 4
19611962
sta zp_temp
19621963
lda #>config_load_address
19631964
; adc #0 ; Not needed, as disk info is always <= 249 bytes
19641965
sta zp_temp + 1
1966+
!ifdef NOSECTORPRELOAD {
1967+
; With no sector preload, we only fill vmem map with the blocks that are in boot file
1968+
ldy #1
1969+
lda (zp_temp),y
1970+
} else {
19651971
ldy #0
19661972
lda (zp_temp),y ; # of blocks in the list
1973+
iny
1974+
}
19671975
tax
19681976
cpx vmap_max_entries
19691977
bcc +
1970-
beq +
19711978
ldx vmap_max_entries
19721979
+ stx vmap_used_entries ; Number of bytes to copy
1973-
iny
19741980
lda (zp_temp),y
19751981
sta vmap_blocks_preloaded ; # of blocks already loaded
19761982

@@ -1980,8 +1986,11 @@ prepare_static_high_memory
19801986
bpl .ignore_blocks
19811987
}
19821988
sta vmap_used_entries
1989+
tax
19831990
.ignore_blocks
19841991

1992+
cpx #0
1993+
beq .no_entries
19851994
; Copy to vmap_z_h
19861995
- iny
19871996
lda (zp_temp),y
@@ -1999,7 +2008,6 @@ prepare_static_high_memory
19992008
inc zp_temp + 1
20002009
+ sta zp_temp
20012010
ldy vmap_used_entries
2002-
beq .no_entries
20032011
dey
20042012
- lda (zp_temp),y
20052013
sta vmap_z_l,y

asm/vmem.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,12 @@ print_vm_map
270270
+ jsr printy
271271
jsr space
272272
lda vmap_z_h,y ; zmachine mem offset ($0 -
273-
and #%11100000
273+
and #$ff xor vmem_highbyte_mask
274274
jsr print_byte_as_hex
275275
jsr space
276276
jsr dollar
277277
lda vmap_z_h,y ; zmachine mem offset ($0 -
278-
and #%00011111
278+
and #vmem_highbyte_mask
279279
jsr printa
280280
lda vmap_z_l,y ; zmachine mem offset ($0 -
281281
jsr print_byte_as_hex

make.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ def print_usage
22692269
File.write(File.join($SRCDIR, 'file_name.asm'), file_name)
22702270

22712271
# Set $no_sector_preload if we can be almost certain it won't be needed anyway
2272-
if $target != 'c128'
2272+
if $target != 'c128' and limit_preload_vmem_blocks == false
22732273
loader_kb = $loader_pic_file ? 5 : 0
22742274
story_kb = ($story_size - $dynmem_blocks * $VMEM_BLOCKSIZE) / 1024
22752275
bootfile_kb = 46

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.12
1+
8.0

0 commit comments

Comments
 (0)