changeset 36:dd3c541ae75b

Move pausemode variables out of main area. There seems to be a problem with the save game format which causes issues loading games if any of the variables in the direct page or higher change size or move.
author William Astle <lost@l-w.ca>
date Fri, 02 Jan 2015 19:48:35 -0700
parents 48ad2dd3b1e9
children 2cee29e025f9
files dod.s
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dod.s	Fri Jan 02 18:52:22 2015 -0700
+++ b/dod.s	Fri Jan 02 19:48:35 2015 -0700
@@ -305,12 +305,14 @@
 
 ; the direct page
 		org VARSTART
+; These variables are additional ones used by extensions to the original ROM
 hook_openi	rmb 2				; the address of the "open for input" routine in Disk ROM
 hook_openo	rmb 2				; the address of the "open for output" routine in the Disk ROM
 error_handler	rmb 2				; the installed error trap
 error_stack	rmb 2				; the stack address to use when transferring control to the error trap
 hook_irq	rmb 2				; the address of the original IRQ routine for Basic
-; These variables are additional ones used by extensions to the original ROM
+pausemode	rmb 1				; nonzero = game paused
+pausedispptr	rmb 2				; saved dungeon display pointer in pause
 		rmb 256-(*&255)			; align the next bit on a page boundary
 ; These are the original variables used by the system, including the direct page.
 zero		rmb 2				; initialized to $0000
@@ -437,8 +439,6 @@
 columnctr	rmb 1				; column counter/tracker for displaying inventory list
 textother	rmb 1				; nonzero means nonstandard text location
 loadsaveflag	rmb 1				; load/save flag - <0 = ZLOAD, >0 = ZSAVE, 0 = regular init
-pausemode	rmb 1				; nonzero = game paused
-pausedispptr	rmb 2				; saved dungeon display pointer in pause
 schedtabfree	rmb 2				; pointer to next free entry in the scheduling table
 readylistchg	rmb 1				; nonzero if the ready list processing should be restarted
 keybufread	rmb 1				; keyboard buffer read offset
@@ -533,6 +533,7 @@
 		lda #zero/256			; point to MSB of direct page
 		tfr a,dp			; set DP appropriately
 		setdp zero/256			; tell the assembler about DP
+		clr pausemode			; flag not in pause mode
 		ldy #LD7E8			; point to variable initialization table
 LC041		lda ,y+				; fetch number of bytes in this initializer
 		beq LC086			; brif zero - we're done