Skip to content

Commit

Permalink
Consider @set_cursor with line = 0 to mean line 1. X16 builds now per…
Browse files Browse the repository at this point in the history
…form NEW before loading game from disk again when restarting, to make debugging easier if file isn't found.
  • Loading branch information
fredrikr committed May 31, 2024
1 parent c61ac26 commit 1a8178a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions asm/disk.asm
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,16 @@ z_ins_restart
}
rts

!ifdef TARGET_X16 {
.restart_code_string
!pet 147,"new",13,13,13,"lO",34,":"
!source "file-name.asm"
!pet 34,","
.device_no
!pet "08",17,17,17,17,13,"rU",13,13,0
.restart_code_keys
!byte 19,13,13,13,00
} else {
.restart_code_string
!pet 147,"lO",34,":"
!source "file-name.asm"
Expand All @@ -726,6 +736,8 @@ z_ins_restart
!pet "08",17,17,17,17,13,"rU",13,13,0
.restart_code_keys
!byte 19,13,13,0
}

.restart_code_end

}
Expand Down
3 changes: 2 additions & 1 deletion asm/screen.asm
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,9 @@ z_ins_set_cursor
ldy current_window
beq .do_nothing_2
ldx z_operand_value_low_arr ; line 1..
beq + ; If line is 0, it's a mistake - they mean line 1.
dex ; line 0..
ldy z_operand_value_low_arr + 1 ; column
+ ldy z_operand_value_low_arr + 1 ; column
dey
jmp set_cursor
}
Expand Down
2 changes: 2 additions & 0 deletions releasenotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Bugfixes:
- make.rb didn't complain if story file had an unsupported Z-code version (or wasn't a Z-code file at all).
- 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.
- Restart didn't work on X16 if the Z-code file had any capital letters.
- 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.
- X16 builds now perform NEW before loading game from disk again when restarting, to make debugging easier if file isn't found.

================================================
Release 14.24: 17 May 2024
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.28
14.29

0 comments on commit 1a8178a

Please sign in to comment.