Skip to content

Commit 1a8178a

Browse files
committed
Consider @set_cursor with line = 0 to mean line 1. X16 builds now perform NEW before loading game from disk again when restarting, to make debugging easier if file isn't found.
1 parent c61ac26 commit 1a8178a

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

asm/disk.asm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,16 @@ z_ins_restart
718718
}
719719
rts
720720

721+
!ifdef TARGET_X16 {
722+
.restart_code_string
723+
!pet 147,"new",13,13,13,"lO",34,":"
724+
!source "file-name.asm"
725+
!pet 34,","
726+
.device_no
727+
!pet "08",17,17,17,17,13,"rU",13,13,0
728+
.restart_code_keys
729+
!byte 19,13,13,13,00
730+
} else {
721731
.restart_code_string
722732
!pet 147,"lO",34,":"
723733
!source "file-name.asm"
@@ -726,6 +736,8 @@ z_ins_restart
726736
!pet "08",17,17,17,17,13,"rU",13,13,0
727737
.restart_code_keys
728738
!byte 19,13,13,0
739+
}
740+
729741
.restart_code_end
730742

731743
}

asm/screen.asm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,9 @@ z_ins_set_cursor
485485
ldy current_window
486486
beq .do_nothing_2
487487
ldx z_operand_value_low_arr ; line 1..
488+
beq + ; If line is 0, it's a mistake - they mean line 1.
488489
dex ; line 0..
489-
ldy z_operand_value_low_arr + 1 ; column
490+
+ ldy z_operand_value_low_arr + 1 ; column
490491
dey
491492
jmp set_cursor
492493
}

releasenotes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Bugfixes:
1010
- make.rb didn't complain if story file had an unsupported Z-code version (or wasn't a Z-code file at all).
1111
- make.rb would not report an error for X16 builds with a stack that's too big (~9+ KB), typically crashing the game at some point.
1212
- Restart didn't work on X16 if the Z-code file had any capital letters.
13+
- Call to @set_cursor with line = 0 are illegal (Z-machine screen starts at line 1), but happen. Ozmoo was placing the cursor on the bottom line of the screen, but now the cursor is placed on the top line (line 1) instead.
14+
- X16 builds now perform NEW before loading game from disk again when restarting, to make debugging easier if file isn't found.
1315

1416
================================================
1517
Release 14.24: 17 May 2024

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.28
1+
14.29

0 commit comments

Comments
 (0)